package com.hulk.other;

import java.util.concurrent.CyclicBarrier;

public class Task implements Runnable {
	private CyclicBarrier cyclicBarrier;

	public Task(CyclicBarrier cyclicBarrier) {
		this.cyclicBarrier = cyclicBarrier;
	}

	@Override
	public void run() {
		try {
			// 等待所有任务准备就绪
			cyclicBarrier.await();
			// 测试内容
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
